home *** CD-ROM | disk | FTP | other *** search
/ Freelog 15 / FREELOG 15.ISO / WebMaster / Perl / PERL5106.ZIP / perl5 / ntt / Op / glob.ntt < prev    next >
Encoding:
Text File  |  1995-11-07  |  622 b   |  25 lines

  1. #!./perl
  2.  
  3. # $RCSfile: glob.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:55 $
  4.  
  5. print "1..4\n";
  6.  
  7. @ops = <op/*>;
  8. $list = join(' ',@ops);
  9.  
  10. # WYT 1995-05-02 - rewritten for MS-DOS, wildcard expansion.
  11. #chop($otherway = `echo op/*`);
  12. $otherway = `perl -e "print( join( ' ', \@ARGV ) )" op/*`;
  13.  
  14. print $list eq $otherway ? "ok 1\n" : "not ok 1\n$list\n$otherway\n";
  15.  
  16. print $/ eq "\n" ? "ok 2\n" : "not ok 2\n";
  17.  
  18. while (<jskdfjskdfj* op/* jskdjfjkosvk*>) {
  19.     $not = "not " unless $_ eq shift @ops;
  20.     $not = "not at all " if $/ eq "\0";
  21. }
  22. print "${not}ok 3\n";
  23.  
  24. print $/ eq "\n" ? "ok 4\n" : "not ok 4\n";
  25.